<?php
/**
 * 定义常量及公共属性
 * @author unity
 */
class DefineBox
{
	// 不同内容元素的编码
	const STORY_TYPE_CODE = 1;
	const EVENT_TYPE_CODE = 2;
	const TIME_TYPE_CODE = 3;
	const SCENE_TYPE_CODE = 4;
	const ROLE_TYPE_CODE = 5;
	const OBJECT_TYPE_CODE = 6;
	const PEDIA_TYPE_CODE = 7;
	
	// 页面类型
	const PAGE_TYPE_ABOUT = 1;
	const PAGE_TYPE_NEWS = 2;
	const PAGE_TYPE_MANUAL = 3;
	
	// 投票类型
	const POLL_LEVEL_CODE = 1;
	
	// 投票状态
	const POLL_STATUS_DELETE = 0;
	const POLL_STATUS_OPEN = 1;
	const POLL_STATUS_CLOSED = 2;
	
	// 性别
	const SEX_F = 0;
	const SEX_M = 1;
	const SEX_N = 2;
	
	// 用户状态
	const USER_STATUS_DELETE = 0;
	const USER_STATUS_ACTIVATED = 1;
	const USER_STATUS_INACTIVE = 2;
	const USER_STATUS_LOCKED = 3;
	
	// NODE访问权限
	const NODE_ACCESS_PUBLIC = 1;
	const NODE_ACCESS_PROTECED = 2;
	const NODE_ACCESS_PRIVATE = 3;
	
	// NODE状态
	const NODE_STATUS_DELETE = 0;
	const NODE_STATUS_EMPTY = 1;
	const NODE_STATUS_LEVELPOLL = 2;
	const NODE_STATUS_NORMAL = 9;
	
	// 用户角色
	const USER_ROLE_AUTHOR = 1;
	const USER_ROLE_EDITOR = 2;
	const USER_ROLE_ADMIN = 9;
	
	//页面访问统计的时间间隔(秒)
	const TIME_COUNTVISIT_LIMIT = 60;
	
	//用户积分
	const USER_SCORE_CNODE = 5; // 创建Node内容
	const USER_SCORE_DNODE = -10; //删除Node内容
	const USER_SCORE_ENODE = 2; //编辑Node内容
	const USER_SCORE_CTALK = 1; // 创建Node内容讨论
	const USER_SCORE_DTALK = -3; // 删除Node内容讨论
	const USER_SCORE_CTOPIC = 2; //创建社区主题
	const USER_SCORE_DTOPIC = -5; // 删除社区主题
	const USER_SCORE_CPOST = 1; // 创建社区跟帖
	const USER_SCORE_DPOST = -3; // 删除社区跟帖
	const USER_SCORE_VOTE = 1; // 参与投票
	
	//社区主题分类
	const TOPIC_TYPE_NOTICE = 1;  //通知公告
	const TOPIC_TYPE_WORK = 2; //站点事务
	const TOPIC_TYPE_IDEA = 3;  //内容建设

########################################################
# 相关数组
########################################################
	
	public static $sexArray = array(
			self::SEX_M =>'男',
			self::SEX_F =>'女',
			self::SEX_N =>'不明',
			);
	
	public static $userStatusArray = array(
			self::USER_STATUS_DELETE => '已删除',
			self::USER_STATUS_ACTIVATED => '正常',
			self::USER_STATUS_INACTIVE => '未激活',
			self::USER_STATUS_LOCKED => '锁定',
			);
	
	public static $nodeAccessArray = array(
			self::NODE_ACCESS_PUBLIC => '公开',
			self::NODE_ACCESS_PROTECED => '受保护',
			self::NODE_ACCESS_PRIVATE => '私有',
			);
	
	public static $nodeStatusArray = array(
			self::NODE_STATUS_DELETE => '被删除',
			self::NODE_STATUS_EMPTY => '内容为空',
			self::NODE_STATUS_LEVELPOLL => '正在等级投票',
			self::NODE_STATUS_NORMAL => '普通',
	);
	
	public static $userRoleArray = array(
			self::USER_ROLE_AUTHOR => '作者',
			self::USER_ROLE_EDITOR => '编辑',
			self::USER_ROLE_ADMIN => '管理员',
			);
			
	public static $pageTypeArray = array(
		self::PAGE_TYPE_ABOUT =>'简介',
		self::PAGE_TYPE_NEWS => '新闻',
		self::PAGE_TYPE_MANUAL => '手册',
		);
	
	public static $topicTypeArray = array(
			self::TOPIC_TYPE_NOTICE => '通知公告',
			self::TOPIC_TYPE_WORK => '站点事务',
			self::TOPIC_TYPE_IDEA => '创意风暴',
			);

	public static $starArray = array(
		1=>'一星',
		2=>'二星',
		3=>'三星',
		4=>'四星',
		5=>'五星',
		);
}